export function formatNum (number) {
    let str = number.toString();
    let reg = str.indexOf(".") > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g;
    return str.replace(reg,"$1,");
}

//广告状态
export function adStatusFilter (status) {
    switch (status) {
        case 1 :
            return '上架中'
            break;
        case 2 :
            return '已下架'
            break;
        default :
            return '未知状态'
            break;
    }
}

//广告类型
export function adTypeFilter (adType) {
    switch (adType) {
        case 1 :
            return '場外交易'
            break;
        case 2 :
            return '擔保交易'
            break;
    }
}

//用户认证
export function userAuth  (status) {
    switch (status) {
        case 1 :
            return '已認證'
            break;
        case 0 :
            return '未認證'
            break;
    }
}

//订单类型
export function recordType (status) {
    switch (status) {
        case 1 :
            return '購買'
            break;
        case 2 :
            return '出售'
            break;
    }
}